package com.zhang.brand.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhang.brand.entity.Brand;
import com.zhang.brand.mapper.BrandMapper;
import com.zhang.brand.service.IBrandService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * <p>
 * 品牌表 服务实现类
 * </p>
 *
 * @author 创世神
 * @since 2023-08-27
 */
@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements IBrandService {

    @Override
    public Page<Brand> getToPage(Integer pageNum, Integer pageSize) {
        return page(new Page<>(pageNum, pageSize));
    }

    @Override
    public List<Brand> getByCategoryId(String categoryId) {
        return baseMapper.listByCategoryId(categoryId);
    }
}
